package com.hwtx.soa.registry.path;

import com.hwtx.soa.registry.ZkClient;
import com.hzgj.bcl.soa.config.ReferenceDef;
import com.hzgj.bcl.soa.config.ServiceDef;

public interface Path {

    String getProviderPath(ServiceDef.Attr attr);

    String getDownChildByServiceAndIpPort(ZkClient client, String service, String ipAndPort);

    String getProviderChildByServiceAndIpPort(ZkClient client, String service, String ipAndPort);

    String getConsumerChildByServiceAndIp(ZkClient client, String service, String ip);

    String getDownPath(String service, String child);

    String getUpPath(String service, String child);

    String getProviderPrefix(String service);

    ServiceDef.Attr buildService(String url);


    //consumer

    String getConsumerPath(ReferenceDef referenceDef);

    String getConsumerPath(String service, String child);

    String getName();
}
